package com.wxg.study;

import org.springframework.boot.Banner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@EnableAutoConfiguration
@SpringBootApplication(scanBasePackages = {"com.wxg.study"})
public class Example {
	
	@RequestMapping("/")
	String home() {
		return "Hello world!";
	}
	
	public static void main(String[] args) {
//		SpringApplication.run(Example.class, args);
		
		SpringApplication application = new SpringApplication(Example.class);
		application.setBannerMode(Banner.Mode.OFF);
		boolean webEnvironment = true;
		application.setWebEnvironment(webEnvironment);
		boolean addCommandLineProperties = false;
		application.setAddCommandLineProperties(addCommandLineProperties);
		
//		application.setAdditionalProfiles("prod");
		
		application.run(args);
	}
}
